<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Set stream</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="httpresponse.setlastmodified.html">HttpResponse::setLastModified</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="httpresponse.setthrottledelay.html">HttpResponse::setThrottleDelay</a></div>
 <div class="up"><a href="class.httpresponse.html">HttpResponse</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="httpresponse.setstream" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">HttpResponse::setStream</h1>
  <p class="verinfo">(PECL pecl_http &gt;= 0.10.0)</p><p class="refpurpose"><span class="refname">HttpResponse::setStream</span> &mdash; <span class="dc-title">Set stream</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-httpresponse.setstream-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">static</span>
   <span class="type">bool</span> <span class="methodname"><strong>HttpResponse::setStream</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$stream</code></span>
   )</div>

  <p class="para rdfs-comment">
   Set the resource to be sent.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara">预先计算过或已定义的
<em>ETag</em> 与 <em>Last-Modified</em> 会被重新计算和重新定义。</span></p></blockquote>
 </div>

 <div class="refsect1 parameters" id="refsect1-httpresponse.setstream-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">stream</code></em></dt>

     <dd>

      <p class="para">
       already opened stream from which the data to send will be read
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-httpresponse.setstream-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>


 


 


 


 <div class="refsect1 seealso" id="refsect1-httpresponse.setstream-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="methodname"><a href="httpresponse.getdata.html" class="methodname" rel="rdfs-seeAlso">HttpResponse::getData()</a> - Get data</span></li>
    <li class="member"><span class="methodname"><a href="httpresponse.setdata.html" class="methodname" rel="rdfs-seeAlso">HttpResponse::setData()</a> - Set data</span></li>
    <li class="member"><span class="methodname"><a href="httpresponse.getfile.html" class="methodname" rel="rdfs-seeAlso">HttpResponse::getFile()</a> - Get file</span></li>
    <li class="member"><span class="methodname"><a href="httpresponse.setfile.html" class="methodname" rel="rdfs-seeAlso">HttpResponse::setFile()</a> - Set file</span></li>
    <li class="member"><span class="methodname"><a href="httpresponse.getstream.html" class="methodname" rel="rdfs-seeAlso">HttpResponse::getStream()</a> - Get Stream</span></li>
   </ul>
  </p>
 </div>



</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="httpresponse.setlastmodified.html">HttpResponse::setLastModified</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="httpresponse.setthrottledelay.html">HttpResponse::setThrottleDelay</a></div>
 <div class="up"><a href="class.httpresponse.html">HttpResponse</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
